class Comment < ApplicationRecord
  default_scope -> { order(id: :desc) }
  belongs_to :blog, counter_cache: :comments_count
  belongs_to :user

  validates :user_id, presence: true
  validates :blog_id, presence: true

end
